package Class9_7;

import java.util.Arrays;

public class Work4 {
    public static void main(String[] args) {
        StringBuffer a=new StringBuffer();
        StringBuilder b=new StringBuilder();
//       a.append("111");
//       System.out.println( a.toString());
        long start=System.nanoTime();
        for (int i = 0; i < 100000; i++) {
            a.append("111");
        }
        long end=System.nanoTime();
        System.out.println(end-start);
        long start1=System.nanoTime();
        for (int i = 0; i < 10000; i++) {
            b.append("111");
        }
        long end1=System.nanoTime();
        System.out.println(end1-start1);
    }
}
